
package std.database.sql

import std.collection.Map
import std.collection.HashMap
import std.sync.Mutex
import std.sort.sort
import std.random.Random
import std.time.DateTime
import std.sync.AtomicBool
import std.collection.{Map, ArrayList}
import std.collection.concurrent.{BlockingQueue, LinkedBlockingQueue}
import std.sync.{Timer, CatchupStyle, AtomicBool, ReentrantMutex}
import std.io.InputStream
import std.math.numeric.Decimal

@!APILevel[
    since: "22"
]
public interface ColumnInfo {
    @!APILevel[
        since: "22"
    ]
    prop name: String
    
    @!APILevel[
        since: "22"
    ]
    prop typeName: String
    
    @!APILevel[
        since: "22"
    ]
    prop length: Int64
    
    @!APILevel[
        since: "22"
    ]
    prop scale: Int64
    
    @!APILevel[
        since: "22"
    ]
    prop nullable: Bool
    
    @!APILevel[
        since: "22"
    ]
    prop displaySize: Int64
}

@!APILevel[
    since: "22"
]
public interface Connection <: Resource {
    @!APILevel[
        since: "22"
    ]
    prop state: ConnectionState
    
    @!APILevel[
        since: "22"
    ]
    func getMetaData(): Map<String, String>
    
    @!APILevel[
        since: "22"
    ]
    func prepareStatement(sql: String): Statement
    
    @!APILevel[
        since: "22"
    ]
    func createTransaction(): Transaction
}

@!APILevel[
    since: "22"
]
public enum ConnectionState <: Equatable<ConnectionState> {
    @!APILevel[
        since: "22"
    ]
    Broken |
    @!APILevel[
        since: "22"
    ]
    Closed |
    @!APILevel[
        since: "22"
    ]
    Connecting |
    @!APILevel[
        since: "22"
    ]
    Connected
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: ConnectionState): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: ConnectionState): Bool
}

@!APILevel[
    since: "22"
]
public interface Datasource <: Resource {
    @!APILevel[
        since: "22"
    ]
    func setOption(key: String, value: String): Unit
    
    @!APILevel[
        since: "22"
    ]
    func connect(): Connection
}

@!APILevel[
    since: "22"
]
public interface Driver {
    @!APILevel[
        since: "22"
    ]
    prop name: String
    
    @!APILevel[
        since: "22"
    ]
    prop version: String
    
    @!APILevel[
        since: "22"
    ]
    prop preferredPooling: Bool
    
    @!APILevel[
        since: "22"
    ]
    func open(connectionString: String, opts: Array<(String, String)>): Datasource
}

@!APILevel[
    since: "22"
]
public class DriverManager {
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    * @throws SqlException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func register(driverName: String, driver: Driver): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func deregister(driverName: String): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func getDriver(driverName: String): Option<Driver>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func drivers(): Array<String>
}

@!APILevel[
    since: "22"
]
public class PooledDatasource <: Datasource {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(datasource: Datasource)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop idleTimeout: Duration
    
    @!APILevel[
        since: "22"
    ]
    public mut prop maxLifeTime: Duration
    
    @!APILevel[
        since: "22"
    ]
    public mut prop keepaliveTime: Duration
    
    @!APILevel[
        since: "22"
    ]
    public mut prop maxSize: Int32
    
    @!APILevel[
        since: "22"
    ]
    public mut prop maxIdleSize: Int32
    
    /**
    * @throws [set] ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public mut prop connectionTimeout: Duration
    
    @!APILevel[
        since: "22"
    ]
    public func setOption(key: String, value: String): Unit
    
    /**
    * @throws getOrThrow
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    * @throws Exception
    * @throws SqlException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func connect(): Connection
    
    @!APILevel[
        since: "22"
    ]
    public func isClosed(): Bool
    
    /**
    * @throws SqlException
    * @throws OutOfMemoryError
    * @throws IndexOutOfBoundsException
    * @throws IllegalSynchronizationStateException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func close(): Unit
}

@!APILevel[
    since: "22"
]
public interface QueryResult <: Resource {
    @!APILevel[
        since: "22"
    ]
    prop columnInfos: Array<ColumnInfo>
    
    @Deprecated[message: "Use memeber funcation `func next(): Bool` instead."]
    @!APILevel[
        since: "22"
    ]
    func next(values: Array<SqlDbType>): Bool
    
    @!APILevel[
        since: "22"
    ]
    func next(): Bool
    
    @!APILevel[
        since: "22"
    ]
    func get<T>(index: Int64): T
    
    @!APILevel[
        since: "22"
    ]
    func getOrNull<T>(index: Int64): ?T
}

@Deprecated
@!APILevel[
    since: "22"
]
public interface SqlDbType {
    @!APILevel[
        since: "22"
    ]
    prop name: String
}

@Deprecated
@!APILevel[
    since: "22"
]
public interface SqlNullableDbType <: SqlDbType {
}

@Deprecated[message: "Use `String` instead."]
@!APILevel[
    since: "22"
]
public class SqlChar <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: String)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: String
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?String` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableChar <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?String)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?String
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `String` instead."]
@!APILevel[
    since: "22"
]
public class SqlVarchar <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: String)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: String
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?String` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableVarchar <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?String)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?String
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Array<Byte>` instead."]
@!APILevel[
    since: "22"
]
public class SqlBinary <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Array<Byte>)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Array<Byte>
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Array<Byte>` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableBinary <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Array<Byte>)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Array<Byte>
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Array<Byte>` instead."]
@!APILevel[
    since: "22"
]
public class SqlVarBinary <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Array<Byte>)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Array<Byte>
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Array<Byte>` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableVarBinary <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Array<Byte>)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Array<Byte>
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `InputStream` instead."]
@!APILevel[
    since: "22"
]
public class SqlClob <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: InputStream)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: InputStream
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?InputStream` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableClob <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?InputStream)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?InputStream
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `InputStream` instead."]
@!APILevel[
    since: "22"
]
public class SqlBlob <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: InputStream)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: InputStream
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?InputStream` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableBlob <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?InputStream)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?InputStream
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Bool` instead."]
@!APILevel[
    since: "22"
]
public class SqlBool <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Bool)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Bool
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Bool` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableBool <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Bool)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Bool
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Int8` instead."]
@!APILevel[
    since: "22"
]
public class SqlByte <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Int8)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Int8
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Int8` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableByte <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Int8)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Int8
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Int16` instead."]
@!APILevel[
    since: "22"
]
public class SqlSmallInt <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Int16)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Int16
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Int16` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableSmallInt <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Int16)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Int16
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Int32` instead."]
@!APILevel[
    since: "22"
]
public class SqlInteger <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Int32)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Int32
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Int32` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableInteger <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Int32)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Int32
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Int64` instead."]
@!APILevel[
    since: "22"
]
public class SqlBigInt <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Int64)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Int64
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Int64` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableBigInt <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Int64)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Int64
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Float32` instead."]
@!APILevel[
    since: "22"
]
public class SqlReal <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Float32)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Float32
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Float32` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableReal <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Float32)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Float32
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Float64` instead."]
@!APILevel[
    since: "22"
]
public class SqlDouble <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Float64)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Float64
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Float64` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableDouble <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Float64)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Float64
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlDate <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableDate <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlTime <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableTime <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlTimeTz <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableTimeTz <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlTimestamp <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?DateTime` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableTimestamp <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?DateTime)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?DateTime
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Duration` instead."]
@!APILevel[
    since: "22"
]
public class SqlInterval <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Duration)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Duration
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Duration` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableInterval <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Duration)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Duration
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `Decimal` instead."]
@!APILevel[
    since: "22"
]
public class SqlDecimal <: SqlDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: Decimal)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: Decimal
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@Deprecated[message: "Use `?Decimal` instead."]
@!APILevel[
    since: "22"
]
public class SqlNullableDecimal <: SqlNullableDbType {
    @!APILevel[
        since: "22"
    ]
    public init(v: ?Decimal)
    
    @!APILevel[
        since: "22"
    ]
    public mut prop value: ?Decimal
    
    @!APILevel[
        since: "22"
    ]
    public prop name: String
}

@!APILevel[
    since: "22"
]
public open class SqlException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public prop sqlState: String
    
    @!APILevel[
        since: "22"
    ]
    public prop errorCode: Int64
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public override prop message: String
    
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String, sqlState: String, errorCode: Int64)
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class SqlOption {
    @!APILevel[
        since: "22"
    ]
    public static const URL: String = "url"
    
    @!APILevel[
        since: "22"
    ]
    public static const Host: String = "host"
    
    @!APILevel[
        since: "22"
    ]
    public static const Username: String = "username"
    
    @!APILevel[
        since: "22"
    ]
    public static const Password: String = "password"
    
    @!APILevel[
        since: "22"
    ]
    public static const Driver: String = "driver"
    
    @!APILevel[
        since: "22"
    ]
    public static const Database: String = "database"
    
    @!APILevel[
        since: "22"
    ]
    public static const Encoding: String = "encoding"
    
    @!APILevel[
        since: "22"
    ]
    public static const ConnectionTimeout: String = "connection_timeout"
    
    @!APILevel[
        since: "22"
    ]
    public static const UpdateTimeout: String = "update_timeout"
    
    @!APILevel[
        since: "22"
    ]
    public static const QueryTimeout: String = "query_timeout"
    
    @!APILevel[
        since: "22"
    ]
    public static const FetchRows: String = "fetch_rows"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLMode: String = "ssl.mode"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLModePreferred: String = "ssl.mode.preferred"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLModeDisabled: String = "ssl.mode.disabled"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLModeRequired: String = "ssl.mode.required"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLModeVerifyCA: String = "ssl.mode.verify_ca"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLModeVerifyFull: String = "ssl.mode.verify_full"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLCA: String = "ssl.ca"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLCert: String = "ssl.cert"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLKey: String = "ssl.key"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLKeyPassword: String = "ssl.key.password"
    
    @!APILevel[
        since: "22"
    ]
    public static const SSLSni: String = "ssl.sni"
    
    @!APILevel[
        since: "22"
    ]
    public static const Tls12Ciphersuites: String = "tls1.2.ciphersuites"
    
    @!APILevel[
        since: "22"
    ]
    public static const Tls13Ciphersuites: String = "tls1.3.ciphersuites"
    
    @!APILevel[
        since: "22"
    ]
    public static const TlsVersion: String = "tls.version"
}

@!APILevel[
    since: "22"
]
public interface Statement <: Resource {
    @!APILevel[
        since: "22"
    ]
    prop parameterColumnInfos: Array<ColumnInfo>
    
    @!APILevel[
        since: "22"
    ]
    func setOption(key: String, value: String): Unit
    
    @Deprecated[message: "Use memeber funcation `func update(): UpdateResult` instead."]
    @!APILevel[
        since: "22"
    ]
    func update(params: Array<SqlDbType>): UpdateResult
    
    @Deprecated[message: "Use memeber funcation `func query(): QueryResult` instead."]
    @!APILevel[
        since: "22"
    ]
    func query(params: Array<SqlDbType>): QueryResult
    
    @!APILevel[
        since: "22"
    ]
    func set<T>(index: Int64, value: T): Unit
    
    @!APILevel[
        since: "22"
    ]
    func setNull(index: Int64): Unit
    
    @!APILevel[
        since: "22"
    ]
    func update(): UpdateResult
    
    @!APILevel[
        since: "22"
    ]
    func query(): QueryResult
}

@!APILevel[
    since: "22"
]
public enum TransactionIsoLevel <: ToString & Hashable & Equatable<TransactionIsoLevel> {
    @!APILevel[
        since: "22"
    ]
    Unspecified |
    @!APILevel[
        since: "22"
    ]
    ReadCommitted |
    @!APILevel[
        since: "22"
    ]
    ReadUncommitted |
    @!APILevel[
        since: "22"
    ]
    RepeatableRead |
    @!APILevel[
        since: "22"
    ]
    Snapshot |
    @!APILevel[
        since: "22"
    ]
    Serializable |
    @!APILevel[
        since: "22"
    ]
    Linearizable |
    @!APILevel[
        since: "22"
    ]
    Chaos
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
    
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: TransactionIsoLevel): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: TransactionIsoLevel): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

@!APILevel[
    since: "22"
]
public enum TransactionAccessMode <: ToString & Hashable & Equatable<TransactionAccessMode> {
    @!APILevel[
        since: "22"
    ]
    Unspecified |
    @!APILevel[
        since: "22"
    ]
    ReadWrite |
    @!APILevel[
        since: "22"
    ]
    ReadOnly
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
    
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: TransactionAccessMode): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: TransactionAccessMode): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

@!APILevel[
    since: "22"
]
public enum TransactionDeferrableMode <: ToString & Hashable & Equatable<TransactionDeferrableMode> {
    @!APILevel[
        since: "22"
    ]
    Unspecified |
    @!APILevel[
        since: "22"
    ]
    Deferrable |
    @!APILevel[
        since: "22"
    ]
    NotDeferrable
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
    
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: TransactionDeferrableMode): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: TransactionDeferrableMode): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

@!APILevel[
    since: "22"
]
public interface Transaction {
    @!APILevel[
        since: "22"
    ]
    mut prop isoLevel: TransactionIsoLevel
    
    @!APILevel[
        since: "22"
    ]
    mut prop accessMode: TransactionAccessMode
    
    @!APILevel[
        since: "22"
    ]
    mut prop deferrableMode: TransactionDeferrableMode
    
    @!APILevel[
        since: "22"
    ]
    func begin(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func commit(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func rollback(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func rollback(savePointName: String): Unit
    
    @!APILevel[
        since: "22"
    ]
    func save(savePointName: String): Unit
    
    @!APILevel[
        since: "22"
    ]
    func release(savePointName: String): Unit
}

@!APILevel[
    since: "22"
]
public interface UpdateResult {
    @!APILevel[
        since: "22"
    ]
    prop rowCount: Int64
    
    @!APILevel[
        since: "22"
    ]
    prop lastInsertId: Int64
}

